package com.yundingai.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yundingai.domain.entity.RelUserPlan;
import com.yundingai.service.RelUserPlanService;
import com.yundingai.mapper.RelUserPlanMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author liyuxiang
* @description 针对表【rel_user_plan】的数据库操作Service实现
* @createDate 2025-07-16 12:43:19
*/
@Service
public class RelUserPlanServiceImpl extends ServiceImpl<RelUserPlanMapper, RelUserPlan>
    implements RelUserPlanService{

    @Autowired
    RelUserPlanMapper relUserPlanMapper;

    @Override
    //新增计划的同时新增用户计划关系
    public void insertUserPlanRelation( Integer planId,Integer userId) {
        relUserPlanMapper.insertRelUserPlan(planId, userId);
    }

    @Override
    //删除计划的同时在用户计划关系表删除
    public void deleteUserPlanRelation(Integer planId) {
        relUserPlanMapper.deleteRelUserPlan(planId);
    }

}




